; Layla

; Constants -------------------------

[Constants]
global $active = 0
global $creditinfo = 0

[Present]
post $active = 0
run = CommandListCreditInfo

; Overrides -------------------------

[TextureOverrideLaylaPosition]
hash = 2656ccca
vb0 = ResourceLaylaPosition
$active = 1

[TextureOverrideLaylaBlend]
hash = 72f035f8
vb1 = ResourceLaylaBlend
handling = skip
draw = 83873, 0 

[TextureOverrideLaylaTexcoord]
hash = fa03c149
vb1 = ResourceLaylaTexcoord

[TextureOverrideLaylaVertexLimitRaise]
hash = 24cdd934

[TextureOverrideLaylaIB]
hash = 8ec3c0d8
handling = skip


[TextureOverrideLaylaHead]
hash = 8ec3c0d8
match_first_index = 0
ib = ResourceLaylaHeadIB
ps-t0 = ResourceLaylaHeadNormalMap
ps-t1 = ResourceLaylaHeadDiffuse
ps-t2 = ResourceLaylaHeadLightMap

ps-t70 = ResourceOutline
run = CommandList\global\ORFix\ORFix
if $body == 1
  drawindexed = 360, 0, 0
endif
if $dress == 1
  drawindexed = 2808, 360, 0
endif
if $bikini1 == 1
  drawindexed = 2808, 3168, 0
endif
if $leotard == 1
  drawindexed = 0, 5976, 0
endif
if $zipline == 1
  drawindexed = 0, 5976, 0
endif
if $stringleotard == 1
  drawindexed = 0, 5976, 0
endif
if $bra == 1
  drawindexed = 0, 5976, 0
endif
if $panty == 1
  drawindexed = 0, 5976, 0
endif
if $bikini2 == 1
  drawindexed = 0, 5976, 0
endif
if $hair1 == 1
  drawindexed = 26436, 5976, 0
endif
if $hair2extra == 1
  drawindexed = 2559, 32412, 0
endif
if $hair3 == 1
  drawindexed = 6603, 34971, 0
endif
if $hair4extra == 1
  drawindexed = 7734, 41574, 0
endif
if $collar1 == 1
  drawindexed = 0, 49308, 0
endif
if $collar2 == 1
  drawindexed = 0, 49308, 0
endif
if $headwear1 == 1
  drawindexed = 0, 49308, 0
endif
if $headwear2 == 1
  drawindexed = 0, 49308, 0
endif
if $headwear3 == 1
  drawindexed = 0, 49308, 0
endif
if $hood1 == 1
  drawindexed = 0, 49308, 0
endif
if $hood2 == 1
  drawindexed = 0, 49308, 0
endif
if $eyepatch1 == 1
  drawindexed = 0, 49308, 0
endif
if $eyepatch2 == 1
  drawindexed = 0, 49308, 0
endif
if $legging1 == 1
  drawindexed = 0, 49308, 0
endif
if $legging2 == 1
  drawindexed = 0, 49308, 0
endif
if $legging3 == 1
  drawindexed = 0, 49308, 0
endif
if $legging4 == 1
  drawindexed = 0, 49308, 0
endif
if $legging5 == 1
  drawindexed = 11652, 49308, 0
endif
if $sleeves1 == 1
  drawindexed = 0, 60960, 0
endif
if $sleeves2 == 1
  drawindexed = 0, 60960, 0
endif
if $sleeves3 == 1
  drawindexed = 0, 60960, 0
endif
if $sleeves4 == 1
  drawindexed = 0, 60960, 0
endif
if $accessories == 1
  drawindexed = 0, 60960, 0
endif


[TextureOverrideLaylaBody]
hash = 8ec3c0d8
match_first_index = 49878
ib = ResourceLaylaBodyIB
ps-t0 = ResourceLaylaBodyNormalMap
ps-t1 = ResourceLaylaBodyDiffuse
ps-t2 = ResourceLaylaBodyLightMap

ps-t70 = ResourceOutline
run = CommandList\global\ORFix\ORFix
if $body == 1
  drawindexed = 1428, 0, 0
endif
if $dress == 1
  drawindexed = 0, 1428, 0
endif
if $bikini1 == 1
  drawindexed = 0, 1428, 0
endif
if $leotard == 1
  drawindexed = 0, 1428, 0
endif
if $zipline == 1
  drawindexed = 0, 1428, 0
endif
if $stringleotard == 1
  drawindexed = 0, 1428, 0
endif
if $bra == 1
  drawindexed = 0, 1428, 0
endif
if $panty == 1
  drawindexed = 0, 1428, 0
endif
if $bikini2 == 1
  drawindexed = 0, 1428, 0
endif
if $hair1 == 1
  drawindexed = 0, 1428, 0
endif
if $hair2extra == 1
  drawindexed = 0, 1428, 0
endif
if $hair3 == 1
  drawindexed = 0, 1428, 0
endif
if $hair4extra == 1
  drawindexed = 0, 1428, 0
endif
if $collar1 == 1
  drawindexed = 0, 1428, 0
endif
if $collar2 == 1
  drawindexed = 0, 1428, 0
endif
if $headwear1 == 1
  drawindexed = 0, 1428, 0
endif
if $headwear2 == 1
  drawindexed = 0, 1428, 0
endif
if $headwear3 == 1
  drawindexed = 1266, 1428, 0
endif
if $hood1 == 1
  drawindexed = 0, 2694, 0
endif
if $hood2 == 1
  drawindexed = 0, 2694, 0
endif
if $eyepatch1 == 1
  drawindexed = 0, 2694, 0
endif
if $eyepatch2 == 1
  drawindexed = 0, 2694, 0
endif
if $legging1 == 1
  drawindexed = 0, 2694, 0
endif
if $legging2 == 1
  drawindexed = 0, 2694, 0
endif
if $legging3 == 1
  drawindexed = 0, 2694, 0
endif
if $legging4 == 1
  drawindexed = 0, 2694, 0
endif
if $legging5 == 1
  drawindexed = 0, 2694, 0
endif
if $sleeves1 == 1
  drawindexed = 0, 2694, 0
endif
if $sleeves2 == 1
  drawindexed = 0, 2694, 0
endif
if $sleeves3 == 1
  drawindexed = 0, 2694, 0
endif
if $sleeves4 == 1
  drawindexed = 0, 2694, 0
endif
if $accessories == 1
  drawindexed = 0, 2694, 0
endif


[TextureOverrideLaylaDress]
hash = 8ec3c0d8
match_first_index = 66474
ib = ResourceLaylaDressIB
ps-t0 = ResourceLaylaDressNormalMap
ps-t1 = ResourceLaylaDressDiffuse
ps-t2 = ResourceLaylaDressLightMap

ps-t70 = ResourceOutline
run = CommandList\global\ORFix\ORFix
if $body == 1
  drawindexed = 132996, 0, 0
endif
if $dress == 1
  drawindexed = 13359, 132996, 0
endif
if $bikini1 == 1
  drawindexed = 16626, 146355, 0
endif
if $leotard == 1
  drawindexed = 14406, 162981, 0
endif
if $zipline == 1
  drawindexed = 1200, 177387, 0
endif
if $stringleotard == 1
  drawindexed = 828, 178587, 0
endif
if $bra == 1
  drawindexed = 4836, 179415, 0
endif
if $panty == 1
  drawindexed = 3384, 184251, 0
endif
if $bikini2 == 1
  drawindexed = 11610, 187635, 0
endif
if $hair1 == 1
  drawindexed = 0, 199245, 0
endif
if $hair2extra == 1
  drawindexed = 0, 199245, 0
endif
if $hair3 == 1
  drawindexed = 0, 199245, 0
endif
if $hair4extra == 1
  drawindexed = 0, 199245, 0
endif
if $collar1 == 1
  drawindexed = 1074, 199245, 0
endif
if $collar2 == 1
  drawindexed = 3168, 200319, 0
endif
if $headwear1 == 1
  drawindexed = 5700, 203487, 0
endif
if $headwear2 == 1
  drawindexed = 1704, 209187, 0
endif
if $headwear3 == 1
  drawindexed = 0, 210891, 0
endif
if $hood1 == 1
  drawindexed = 16266, 210891, 0
endif
if $hood2 == 1
  drawindexed = 3963, 227157, 0
endif
if $eyepatch1 == 1
  drawindexed = 300, 231120, 0
endif
if $eyepatch2 == 1
  drawindexed = 396, 231420, 0
endif
if $legging1 == 1
  drawindexed = 4083, 231816, 0
endif
if $legging2 == 1
  drawindexed = 4875, 235899, 0
endif
if $legging3 == 1
  drawindexed = 21591, 240774, 0
endif
if $legging4 == 1
  drawindexed = 3384, 262365, 0
endif
if $legging5 == 1
  drawindexed = 0, 265749, 0
endif
if $sleeves1 == 1
  drawindexed = 7176, 265749, 0
endif
if $sleeves2 == 1
  drawindexed = 2514, 272925, 0
endif
if $sleeves3 == 1
  drawindexed = 5256, 275439, 0
endif
if $sleeves4 == 1
  drawindexed = 11898, 280695, 0
endif
if $accessories == 1
  drawindexed = 708, 292593, 0
endif


[TextureOverrideLaylaFaceHeadNormalMap]
hash = 1089b539
ps-t0 = ResourceLaylaFaceHeadNormalMap


; CommandList -----------------------

[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1
	pre Resource\ShaderFixes\help.ini\Notification = ResourceCreditInfo
	pre run = CustomShader\ShaderFixes\help.ini\FormatText
	pre $\ShaderFixes\help.ini\notification_timeout = time + 5.0
	$creditinfo = 1
endif

; Resources -------------------------

[ResourceLaylaPosition]
type = Buffer
stride = 40
filename = LaylaPosition.buf

[ResourceLaylaBlend]
type = Buffer
stride = 32
filename = LaylaBlend.buf

[ResourceLaylaTexcoord]
type = Buffer
stride = 20
filename = LaylaTexcoord.buf

[ResourceLaylaHeadIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LaylaHead.ib

[ResourceLaylaBodyIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LaylaBody.ib

[ResourceLaylaDressIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LaylaDress.ib

[ResourceLaylaHeadNormalMap]
filename = LaylaHeadNormalMap.dds

[ResourceLaylaHeadDiffuse]
filename = LaylaHeadDiffuse.dds

[ResourceLaylaHeadLightMap]
filename = LaylaHeadLightMap.dds

[ResourceLaylaBodyNormalMap]
filename = LaylaBodyNormalMap.dds

[ResourceLaylaBodyDiffuse]
filename = LaylaBodyDiffuse.dds

[ResourceLaylaBodyLightMap]
filename = LaylaBodyLightMap.dds

[ResourceLaylaDressNormalMap]
filename = LaylaDressNormalMap.dds

[ResourceLaylaDressDiffuse]
filename = LaylaDressDiffuse.dds

[ResourceLaylaDressLightMap]
filename = LaylaDressLightMap.dds

[ResourceLaylaFaceHeadNormalMap]
filename = LaylaFaceHeadNormalMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Use H for infos"

[ResourceOutline]
filename = outline.dds


[ResourceMenu]
filename = Menu.dds

;ps-t70 = ResourceOutline
;run = CommandList\global\ORFix\ORFix


; .ini generated by GIMI (Genshin-Impact-Model-Importer)
; If you have any issues or find any bugs, please open a ticket at https://github.com/SilentNightSound/GI-Model-Importer/issues or contact SilentNightSound#7430 on discord
[Constants]
global persist $body = 1
global persist $dress = 0
global persist $bikini1 = 0
global persist $leotard = 1
global persist $zipline = 1
global persist $stringleotard = 1
global persist $bra = 0
global persist $panty = 0
global persist $hair1 = 0
global persist $hair2extra = 0
global persist $hair3 = 1
global persist $hair4extra = 1
global persist $collar1 = 0
global persist $collar2 = 1
global persist $headwear1 = 0
global persist $headwear2 = 0
global persist $headwear3 = 0
global persist $hood1 = 1
global persist $hood2 = 0
global persist $eyepatch1 = 0
global persist $eyepatch2 = 1
global persist $legging1 = 0
global persist $legging2 = 1
global persist $legging3 = 1
global persist $legging4 = 0
global persist $legging5 = 0
global persist $sleeves1 = 0
global persist $sleeves2 = 0
global persist $sleeves3 = 0
global persist $sleeves4 = 1
global persist $accessories = 0
global persist $bikini2 = 0
[KeySwap3]
key = no_shift no_alt 5
back = no_shift alt 5
condition = $active == 1
type = cycle
$dress =         0,0,0,0,0,0,0,0,0,1,1,1,0,0,0
$bikini1 =       0,0,0,0,0,0,0,0,0,1,0,1,1,1,0
$leotard =       0,1,0,0,1,0,0,0,0,0,0,0,0,0,0
$zipline =       0,1,1,1,0,0,0,0,0,0,0,0,0,0,0
$stringleotard = 0,1,1,0,0,0,0,0,0,0,0,0,0,0,0
$bikini2 =       0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
$bra =           0,0,0,0,0,0,1,0,1,0,0,0,0,0,0
$panty =         0,0,0,0,0,0,1,1,0,0,0,0,0,0,0
$accessories =   0,0,0,0,0,0,0,0,0,1,0,1,1,0,1

[KeySwap20]
key = no_shift no_alt 6
back = no_shift alt 6
condition = $active == 1
type = cycle
$legging1 = 0,0,0,0,0,0,0,0,1
$legging2 = 0,1,1,1,0,0,0,0,0
$legging3 = 0,1,0,0,1,0,1,0,0
$legging4 = 0,1,1,0,0,1,1,0,0
$legging5 = 0,0,0,0,0,0,0,1,0

[KeySwap23]
key = no_shift no_alt 7
back = no_shift alt 7
condition = $active == 1
type = cycle
$sleeves1 = 0,0,0,0,0,1
$sleeves2 = 0,0,1,0,1,0
$sleeves3 = 0,0,0,1,1,0
$sleeves4 = 0,1,0,0,0,0

[KeySwap15]
key = no_shift no_alt 8
back = no_shift alt 8
condition = $active == 1
type = cycle
$hood1 =     0,1,0,0,0,0,0,0,0,0,0
$hood2 =     0,0,1,1,0,0,0,0,0,0,0
$headwear1 = 0,0,0,0,1,1,0,1,0,0,1
$headwear2 = 0,0,0,0,1,1,1,0,0,1,0
$headwear3 = 0,0,0,1,1,0,1,1,1,0,0

[KeySwap9]
key = no_shift no_alt 9
condition = $active == 1
type = cycle
$hair1 =      1,1,0,0
$hair2extra = 0,1,0,0
$hair3 =      0,0,1,1
$hair4extra = 0,0,1,0

[KeySwap10]
key = no_shift alt 9
condition = $active == 1
type = cycle
$collar1 = 1,0
$collar2 = 0,1

[KeySwap17]
key = no_shift no_alt Y
condition = $active == 1
type = cycle
$eyepatch1 = 0,0,1
$eyepatch2 = 0,1,0

[KeyQuickDress]
key = no_shift no_alt N
back = no_shift alt N
condition = $active == 1
type = cycle

$dress =         0,0,0,0,0,1,0,0,0,0
$bikini1 =       0,0,0,0,0,1,1,0,0,0
$leotard =       0,1,0,0,0,0,0,0,0,0
$zipline =       0,1,1,0,0,0,0,0,0,0
$stringleotard = 0,1,0,0,0,0,0,0,0,0
$bra =           0,0,0,1,0,0,0,1,0,0
$panty =         0,0,0,1,0,0,0,1,0,0
$bikini2 =       0,0,1,0,0,0,0,0,1,0
$accessories =   0,0,0,0,0,1,1,0,0,0
$collar1 =       1,0,0,0,0,1,1,1,1,1
$collar2 =       0,1,1,1,1,0,0,0,0,0
$hood1 =         0,1,1,1,0,0,0,0,0,0
$hood2 =         0,0,0,0,0,0,0,1,1,1
$headwear1 =     0,0,0,0,0,1,1,0,0,0
$headwear2 =     0,0,0,0,0,1,1,0,0,0
$headwear3 =     0,0,0,0,0,1,1,1,1,1
$legging1 =      0,0,0,0,0,1,1,0,0,0
$legging2 =      0,1,1,1,1,0,0,0,0,0
$legging3 =      0,1,1,1,1,0,0,0,0,0
$legging4 =      0,1,1,1,1,0,0,0,0,0
$legging5 =      0,0,0,0,0,0,0,1,1,1
$sleeves1 =      0,0,0,0,0,1,1,0,0,0
$sleeves2 =      0,0,0,0,0,0,0,1,1,1
$sleeves3 =      0,0,0,0,0,0,0,1,1,1
$sleeves4 =      0,1,1,1,1,0,0,0,0,0
